<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$smarty.const.Site_Name}</title>
<link href="css/public.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="Js/menu.js"></script>
<script type="text/javascript" src="Js/cart.js"></script>
<script type="text/javascript" src="Js/product.js"></script>
<script type="text/javascript" src="Js/exec.js"></script>
</head>

<body>
{include file="header.html"}
<div class="center">
	<div class="left">{include file="menu.html"}</div>
	<div class="right">
		<div class="Nav">
			<ul>
			{if $BTP.product.show}<li><a href="{write_url url=$thisurl open='product' DEL='ALL'}">继续添加产品</a></li>{/if}
			{if $BTP[$get.open].del}<li><a href="{write_url url=$thisurl action='del' DEL='ALL'}">清空缓存</a></li>{/if}
			{if $BTP[$get.open].show}<li><a href="{write_url url=$thisurl action='show' DEL='ALL'}" {CLASS_COLOR show=$get.action CLASS='this'}>代理群发产品短信</a></li>{/if}
			</ul>
			<span class="clear"></span>
		</div>
		{if $get.action == 'error'}
			<div style="padding:5em 0; text-align:center">
			{if $get.code == -1}
				短信发送未成功 , <a href="{write_url open='product_sms' action='send'}">点击重新发送</a>
			{elseif $get.code == 1}
				缓存中没有产品 , <a href="{write_url open='product'}">点击添加产品</a>
			{elseif $get.code == 2}
				你选择的产品不存在 , <a href="{write_url open='product'}">点击添加产品</a>
			{elseif $get.code == 3}
				手机号码不正确 , <a href="{write_url open='product_sms'}">请重新添加代理</a>
			{/if}
			</div>
		{elseif $get.action == 'successful'}
			<div style="padding:5em 0; text-align:center">
			{if $back.P_SMS.infos.no}
				<b style="color:#06F">{$back.P_SMS.infos.yes}</b> 条短信发送成功
				<b style="color:#F00">{$back.P_SMS.infos.no}</b> 条短信发送失败<br />
				<a href="{write_url open='product_sms' action='anew'}">点击重新发送</a>
			{else}
				<b style="color:#06F">{$back.P_SMS.infos.yes}</b> 条短信 已经全部 发送成功
			{/if}
			</div>
		{else}
		<div class="show">
			<table width="100%" border="0" cellspacing="1" cellpadding="0" id="tab_show">
				<tr>
					<th>编号</th>
					<th>形状</th>
					<th>重量</th>
					<th>颜色</th>
					<th>净度</th>
					<th>切工</th>
					<th>抛光</th>
					<th>对称</th>
					<th>荧光</th>
					<th>测量值</th>
					<th>证书</th>
					<th>退点</th>
					<th>基准退点</th>
					<th>¥/每颗</th>
					<th>数量</th>
					<th width="5%">详情</th>
					<th width="5%">删除</th>
				</tr>
				{foreach item=pso from=$list_cart}
				<tr align="center">
					<td>{brite_spot query =$get.info str=$pso.ProID}</td>
					<td>{$shape[$pso.shape]}</td>
					<td>{$pso.weight} / ct</td>
					<td>{$pso.color}</td>
					<td>{$pso.clarity}</td>
					<td>{$pso.cut}</td>
					<td>{$pso.buffing}</td>
					<td>{$pso.symmetry}</td>
					<td>{$pso.Fent_Isity}</td>
					<td>{$pso.scalar_value}</td>
					<td>{Goto_diploma diploma=$pso.diploma weight=$pso.weight NO=$pso.diplomaNO show=$pso.diploma}</td>
					{if $pso.is_promotion == 'Y' and $pso.promotion_start <= mktime() and $pso.promotion_stop >= mktime()}
					<td class="promotion">{$pso.agio+$pso.baseAgio+$pso.promotion_dot} %</td>
					<td class="promotion">促销</td>
					<td class="promotion">{sprintf('%.2f' , $pso.INTbid*$pso.weight*(100+$pso.agio+$pso.baseAgio+$pso.promotion_dot)/100)} 元</td>
					{else}
					<td>{$pso.agio} %</td>
					<td>{$pso.baseAgio} %</td>
					<td>{$pso.infml}</td>
					{/if}
					<td>{$pso.amount}</td>
					<td class="action">{if $BTP[$get.open].detail}<a href="javascript:;" onclick="show_pro_detail(this , '{$pso.id}' , 17)" class="act_3_10" title="产品详情"></a>{/if}</td>
					<td class="action">{if $BTP[$get.open].del}<a href="{write_url url=$thisurl action='del' id=$pso.id}" class="act_1_5" title="删除"></a>{/if}</td>
				</tr>
				{foreachelse}
				<tr><td colspan="17" class="else">缓存中没有产品 , <a href="{write_url url=$thisurl open='product' DEL='ALL'}">点击添加产品</a></td></tr>
				{/foreach}
			</table>
			{if $BTP[$get.open].add_proxy and count($list_cart)}
			
				<table width="100%" border="0" cellspacing="1" cellpadding="0" style="margin:1em 0 0 0">
					<tr><th colspan="10">添加代理</th></tr>
					<tr>
						<td colspan="5" align="right" class="Need">代理信息</td>
						<td colspan="5" class="AjaxShow">
							<form action="{write_url url=$thisurl action='add_proxy'}" method="post">
								<input type="hidden" name="proxy_id" id="proxy_id" />
								<input type="text" name="proxy_write" id="proxy_write" value="账号,编号,姓名" onfocus="change_id(this , 'proxy')" />
								<b></b>
								<input type="submit" class="add_or" value="   添  加   " />
							</form>
						</td>
					</tr>
					<tr align="center">
						<td>代理账号</td>
						<td>真实姓名</td>
						<td>昵称</td>
						<td>编号</td>
						<td>代理组</td>
						<td>公司</td>
						<th>手机号码</th>
						<td>促销价</td>
						<td>组退点</td>
						<td width="5%">删除</td>
					</tr>
					{foreach item=pso from=$proxy_list}
					<tr>
						<td>{$pso.account}</td>
						<td>{$pso.name}</td>
						<td>{$pso.nickname}</td>
						<td align="center">{$pso.number}</td>
						<td>{$pso.group}</td>
						<td>{$pso.company_name}</td>
						<th>{$pso.content}</th>
						<td align="center">{if $pso.is_offer == 'Y'}支持{else}不支持{/if}</td>
						<td align="center">{$pso.rebate}</td>
						<td align="center" class="action">{if $BTP[$get.open].del_proxy}<a href="{write_url url=$thisurl action='del_proxy' id=$pso.id}" class="act_1_5" title="删除"></a>{/if}</td>
					</tr>
					{/foreach}
					{if count($back.P_SMS.proxy)}
					<tr><td colspan="10" align="center" style="color:#F00; height:25px">注意:如果添加的代理没有手机号码,或者号码不正确将不会被发送短信</td></tr>
					<tr><td colspan="10" align="center"><input type="button" class="add_or" value="  发送短信  " onclick="window.location = '{write_url url=$thisurl action='send'}';" /></td></tr>
					{/if}
				</table>
			{/if}
		</div>
		{/if}
	</div>
	<b class="clear"></b>
</div>
</body>
</html>